﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utilities
{
    public class GraphElementCollection : List<GraphElement>
    {
        public GraphElement this[string name]
        {
            get
            {
                return this.SingleOrDefault(e => e.Name == name);
            }
        }
    }
    public class GraphElementCollection<T> : List<GraphElement<T>>
    {
        public GraphElement<T> this[string name]
        {
            get
            {
                return this.SingleOrDefault(e => e.Name == name);
            }
        }
    }
}
